<?php

namespace common\model;

use think\model\RelationModel;

class ChatUnreadMessageModel extends RelationModel
{
    //自动验证
    protected $_validate = [
        ['user_id', '', '', self::MUST_VALIDATE, 'require', self::MODEL_INSERT],//必须字段
        ['chat_global_id', '', '', self::MUST_VALIDATE, 'require', self::MODEL_INSERT],//必须字段
        ['message_id', '', '', self::MUST_VALIDATE, 'require', self::MODEL_INSERT]//必须字段
    ];

    // 自动完成
    protected $_auto = [
        ['created', 'time', self::MODEL_INSERT, 'function'],
    ];
}
